package domain;

import java.sql.Date;
import java.util.Random;

public class Task extends CreateFactory {
	
	private int id;
	private int number;
	private String desc;
	private Date startDate;
	private int hours;
	private int resourceId;
	Random rndm;
	
	public Task(int id, int number, String desc, Date startDate, int hours,
			int resourceId) {
		super();
		this.id = rndm.nextInt();
		this.number = number;
		this.desc = desc;
		this.startDate = startDate;
		this.hours = hours;
		this.resourceId = resourceId;
	}
	
	public Task() {
		super();
	}

	public Task create()
	{
		Task myTask = new Task();
		myTask.setId(rndm.nextInt());
		myTask.setNumber(number);
		myTask.setDesc(desc);
		myTask.setStartDate(startDate);
		myTask.setHours(hours);
		myTask.setResourceId(resourceId);
		return myTask;
	}
	
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	public int getNumber() {
		return number;
	}
	
	public void setNumber(int number) {
		this.number = number;
	}
	
	public String getDesc() {
		return desc;
	}
	
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	public Date getStartDate() {
		return startDate;
	}
	
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	public int getHours() {
		return hours;
	}
	
	public void setHours(int hours) {
		this.hours = hours;
	}
	
	public int getResourceId() {
		return resourceId;
	}
	
	public void setResourceId(int resourceId) {
		this.resourceId = resourceId;
	}
	
	public void destroy()
	{
		
	}

}
